package com.bootcamp.s3_1013.database._1014;

/**
 * @program: myClassCode
 * @description: class enum and normal person
 * @author: Keyu Li
 * @create: 2021-10-14 11:13
 **/

public class Demo2_enum {
    public static void main(String[] args) {
//        new Person(5,"zs");  不能在外部构建枚举类实例对象
        Person.ZHANGSAN.setId(1);  // 只能通过此方法获取实例对象
        System.out.println(Person.ZHANGSAN.getId()+Person.ZHANGSAN.getName()+Person.ZHANGSAN.id);
    }
}
